#pragma once
#include "fxcc/core/BaseLoader.h"
#include "e2d/core/Scene.h"

namespace e2d
{
	struct Entity;

	struct PrefebLoader :public BaseLoader
	{
		static std::unordered_map<std::string, std::shared_ptr<e2d::Entity>> m_PrefebEntities;

		static std::unordered_map<std::string, std::shared_ptr<e2d::Entity>> m_PrefebEntitiesNativeMap;

		bool LoadFile(const fxcc::File& file) override;

		std::shared_ptr<e2d::Entity> LoadPrefebFromNativePath(const fxcc::File& file);

		std::shared_ptr<e2d::Entity> LoadPrefebFile(const std::string& path);

		std::shared_ptr<e2d::Entity> AddEntityToSceneNativePath(e2d::Scene* scene, e2d::Entity* parent,const std::string& nativeFilePath);
	};
};